package io.github.lee.jel.api

import io.github.lee.jel.domain.Item
import io.github.lee.jel.domain.Page
import io.github.lee.jel.domain.Response
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface PlayListApi {
    @GET("/Users/{userId}/Items/Resume")
    suspend fun playingList(
        @Path("userId") userId: String,
        @Query("startIndex") startIndex: Int? = null,
        @Query("limit") limit: Int? = null,
        @Query("searchTerm") searchTerm: String? = null,
        @Query("fields") fields: List<String>? = null,
        @Query("mediaTypes") mediaTypes: List<String>? = null,
    ): Response<Page<Item>>


    @GET("/Users/{userId}/Items/Latest")
    suspend fun latest(
        @Path("userId") userId: String,
        @Query("parentId") parentId: String,
        @Query("startIndex") startIndex: Int? = null,
        @Query("limit") limit: Int? = null,
    ): Response<List<Item>>

}